import request from '@/utils/request'

// 查询目标节拍列表
export function listBEAT(query) {
  return request({
    url: '/funConfig/BEAT/list',
    method: 'get',
    params: query
  })
}

// 查询目标节拍详细
export function getBEAT(eqpId, productId, mainStep, stepId) {
  return request({
    url: '/funConfig/BEAT/getInfo/?eqpId=' + eqpId + '&productId='+productId + '&mainStep='+mainStep + '&stepId='+stepId,
    method: 'get'
  })
}

// 新增目标节拍
export function addBEAT(data) {
  return request({
    url: '/funConfig/BEAT',
    method: 'post',
    data: data
  })
}

// 修改目标节拍
export function updateBEAT(data) {
  return request({
    url: '/funConfig/BEAT',
    method: 'put',
    data: data
  })
}

// 删除目标节拍
export function delBEAT(eqpId, productId, mainStep, stepId) {
  return request({
    url: '/funConfig/BEAT/' + eqpId,
    method: 'delete'
  })
}
